<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>添加地址</title>
    <link rel="stylesheet" href="css/bootstrap.css"/>
</head>
<body>
<div class="container">

    <h2 class="text-center">添加地址</h2>
    <br>

    <form method="post" name="form1" role="form"
          class="form-horizontal">

        <!--        <div data-toggle="distpicker">-->
        <!--            <select></select>-->
        <!--            <select></select>-->
        <!--            <select></select>-->
        <!--        </div>-->

        <div class="form-group">
            <label class="col-md-2 control-label">地址：</label>
            <div class="col-md-10">
                <input class="form-control" type="text" name="address" id="address">
            </div>
        </div>
        <div class="form-group">
            <label class="col-md-2 control-label">收件人姓名：</label>
            <div class="col-md-10">
                <input class="form-control" type="text" name="addressee" id="addressee">
            </div>
        </div>
        <div class="form-group">
            <label class="col-md-2 control-label">手机号码：</label>
            <div class="col-md-10">
                <input class="form-control" type="text" name="phone" id="phone">
            </div>
        </div>
        <div class="form-group">
            <label class="col-md-2 control-label">备注：</label>
            <div class="col-md-10">
                <input class="form-control" type="text" name="remark" id="remark">
            </div>
        </div>
        <!--<div class="form-group  text-center">
            <label class="col-md-2 control-label">新增收货地址：</label>
            <input type="button" class="btn btn-primary" id="add_address" >
        </div>-->
        <div class="form-group  text-center">
            <input type="button" class="btn btn-primary" value="保存地址信息" id="submit">
        </div>
    </form>
</div>
</div>


</body>
<script src="js/jquery-3.2.1.js"></script>
<script src="js/layer/layer.js"></script>
<script src="js/Vue-2.6.11.js"></script>
<script src="js/axios.min.js"></script>
<script src="js/global.js"></script>
<script>
    $(function () {
        $("#submit").click(function () {
            $.post('address/address_add', {
                remark: $('#remark').val(),
                phone: $('#phone').val(),
                addressuser: $('#address').val(),
                addressee: $('#addressee').val()
            }, function (data) {
                console.log(data.msg);
            }, 'JSON');
            location.href = "query_user.html"
        })
    })


</script>
</html>